package PTA.javabianchengjichu2;

import java.util.Scanner;

public class ex08 {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum1=0;
        int sum2=0;
        for(int i=0;i<n;i++){
            int a=sc.nextInt();
            if(a%2==0){
                sum1+=a;
            }else{
                sum2+=a;
            }
        }
        System.out.println("奇数和="+sum2+","+"偶数和="+sum1);
    }
}
